package com.hnqcgczy.supplier.service;

import com.hnqcgczy.supplier.vo.Admin;

import java.sql.SQLException;
import java.util.List;

public interface AdminService {
    /**
     * 注册功能
     *
     * @param admin
     * @return
     * @throws SQLException
     */
    boolean reg(Admin admin);

    /**
     * 登陆功能
     *
     * @param username
     * @param password
     * @return
     * @throws SQLException
     */
    Admin login(String username, String password) throws SQLException;

    /**
     * 修改功能
     *
     * @param admin
     * @return
     * @throws SQLException
     */
    boolean updateById(Admin admin) throws SQLException;

    /**
     * 删除功能
     *
     * @param id
     * @return
     * @throws SQLException
     */
    boolean deleteById(Integer id) throws SQLException;

    /**
     * 查询功能
     *
     * @param admin
     * @return
     * @throws SQLException
     */
    List<Admin> queryAdmin(Admin admin) throws SQLException;

}
